SLIAudioPlayer

Undocumented in source.
version(Android)
__gshared
struct SLIAudioPlayer {}

Members

Aliases

PlayerCallback
alias PlayerCallback = void function(SLPlayItf player, void* context, SLuint32 event)
Undocumented in source.

Functions

GetState
int GetState()
Undocumented in source. Be warned that the author may not have intended to support it.
RegisterCallback
void RegisterCallback(PlayerCallback callback, void* context)
Undocumented in source. Be warned that the author may not have intended to support it.
SetCallbackEventsMask
void SetCallbackEventsMask(uint mask)
Undocumented in source. Be warned that the author may not have intended to support it.
getProcessedBuffer
SLIBuffer* getProcessedBuffer()

Gets a free buffer from the /\ list

pushBuffer
void pushBuffer(SLIBuffer* buffer)
Undocumented in source. Be warned that the author may not have intended to support it.
removeFreeBuffer
void removeFreeBuffer(SLIBuffer* freeBuffer)

Will remove the free buffer and set it as unused /b\ -> (0)

unqueue
void unqueue(SLIBuffer* processedBuffer)

Will put the processed buffer into the free list |b| -> /b\

update
void update()
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

Clear
void Clear(SLIAudioPlayer audioPlayer)
Undocumented in source. Be warned that the author may not have intended to support it.
Enqueue
void Enqueue(SLIAudioPlayer audioPlayer, void* samples, size_t sampleSize)

Same behavior from (*androidBufferQueue).Enqueue. If you wish to use queue for streaming sound, call pushBuffer

checkStreamCallback
void checkStreamCallback(SLPlayItf player, void* context, SLuint32 event)

Checking some bug issues tracker: - https://groups.google.com/g/android-ndk/c/zANdS2n2cQI

destroyAudioPlayer
void destroyAudioPlayer(SLIAudioPlayer audioPlayer)

Also invalidates enqueued SLIBuffer, so, destroy with care

pause
void pause(SLIAudioPlayer audioPlayer)
Undocumented in source. Be warned that the author may not have intended to support it.
play
void play(SLIAudioPlayer audioPlayer)
Undocumented in source. Be warned that the author may not have intended to support it.
resume
void resume(SLIAudioPlayer audioPlayer)
Undocumented in source. Be warned that the author may not have intended to support it.
seekClipPosition
void seekClipPosition(SLIAudioPlayer audioPlayer, float posMillis, SLuint32 seekMode)
Undocumented in source. Be warned that the author may not have intended to support it.
setLoop
void setLoop(SLIAudioPlayer audioPlayer, bool shouldLoop)
Undocumented in source. Be warned that the author may not have intended to support it.
setRate
void setRate(SLIAudioPlayer audioPlayer, float rate)
Undocumented in source. Be warned that the author may not have intended to support it.
setVolume
void setVolume(SLIAudioPlayer audioPlayer, float gain)
Undocumented in source. Be warned that the author may not have intended to support it.
stop
void stop(SLIAudioPlayer audioPlayer)
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

EnqueuedBuffer
struct EnqueuedBuffer
Undocumented in source.

Variables

androidEffect
SLAndroidEffectItf androidEffect;
Undocumented in source.
androidEffectSend
SLAndroidEffectSendItf androidEffectSend;
Undocumented in source.
bassBoost
SLBassBoostItf bassBoost;
Undocumented in source.
enqueued
EnqueuedBuffer enqueued;
Undocumented in source.
envReverb
SLEnvironmentalReverbItf envReverb;
Undocumented in source.
equalizer
SLEqualizerItf equalizer;
hasFinishedTrack
bool hasFinishedTrack;
isLooping
bool isLooping;
Undocumented in source.
isPlaying
bool isPlaying;
Undocumented in source.
nextBuffer
SLIBuffer* nextBuffer;
Undocumented in source.
playbackRate
SLPlaybackRateItf playbackRate;
Undocumented in source.
player
SLPlayItf player;

Play/stop/pause the audio

playerAndroidSimpleBufferQueue
SLAndroidSimpleBufferQueueItf playerAndroidSimpleBufferQueue;
Undocumented in source.
playerEffectSend
SLEffectSendItf playerEffectSend;

TODO:

playerMetadata
SLMetadataExtractionItf playerMetadata;

TODO:

playerObj
SLObjectItf playerObj;

The Audio player

playerSeek
SLSeekItf playerSeek;

Ability to get and set the audio duration

playerVol
SLVolumeItf playerVol;

Controls the volume

presetReverb
SLPresetReverbItf presetReverb;
Undocumented in source.
streamQueue
SLIBuffer** streamQueue;

This queue works as:

streamQueueCapacity
ushort streamQueueCapacity;
Undocumented in source.
streamQueueFree
ushort streamQueueFree;

Data between / \

streamQueueLength
ushort streamQueueLength;

Data between | |

totalChunksEnqueued
ushort totalChunksEnqueued;

How many chunks have been streamed to that player

totalChunksPlayed
ushort totalChunksPlayed;

How many chunks have been played

virtualizer
SLVirtualizerItf virtualizer;
Undocumented in source.
volume
float volume;
Undocumented in source.

Meta